import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JTextField;


public class Ventana1 extends JFrame {

	private JPanel contentPane;
	private JTextArea areaDeTexto;
	private JButton botonOeste;
	private JButton botonNorte;
	private JButton botonEste;
	private JTextField textField;
	
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Ventana1 frame = new Ventana1();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Ventana1() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		textField = new JTextField();
		contentPane.add(textField, BorderLayout.NORTH);
		textField.setColumns(10);
		botonNorte = new JButton("Mi boton");
		contentPane.add(botonNorte, BorderLayout.NORTH);
		
		botonNorte = new JButton("Mi boton");
		contentPane.add(botonEste, BorderLayout.EAST);
		
		botonOeste = new JButton("OTRO BOTON");
		contentPane.add(botonOeste, BorderLayout.WEST);
		botonOeste.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent arg0) {
				JOptionPane.showMessageDialog(Ventana1.this, Ventana1.this.areaDeTexto.getText());				
			}
		});
		
		areaDeTexto = new JTextArea();
		contentPane.add(areaDeTexto, BorderLayout.CENTER);
		
	}
}
